<?php

    if(isset($_SESSION['userID'])) {

        // save language
        $languageID = $_SESSION['languageID'];

        // unset complete session
        session_name('cms_session');
        //session_destroy();
        session_unset();

        // write language back
        $_SESSION['languageID'] = $languageID;

        // output success
        $template_vars = array("message" => $this->getText('successful_logout'));
        echo $indexModul->getTemplate('successful_content',$template_vars);
        echo '<meta http-equiv="refresh" content="3;url=index.php">';
    }
    else {
        header('Location: index.php');
    }

?>